package net.lab1024.sa.admin.module.users.equipmentmanage.controller;

//import net.lab1024.sa.admin.module.users.equipmentmanage.domain.form.EquipmentManageAddForm;
import net.lab1024.sa.admin.module.fabricmaterials.domain.vo.FabricMaterialsVO;
import net.lab1024.sa.admin.module.fabricmaterials.service.FabricMaterialsService;
import net.lab1024.sa.admin.module.users.equipmentmanage.domain.form.EquipmentManageQueryForm;
//import net.lab1024.sa.admin.module.users.equipmentmanage.domain.form.EquipmentManageUpdateForm;
import net.lab1024.sa.admin.module.users.equipmentmanage.domain.vo.EquipmentManageVO;
import net.lab1024.sa.admin.module.users.equipmentmanage.service.EquipmentManageService;
import cn.dev33.satoken.annotation.SaCheckPermission;
import net.lab1024.sa.base.common.domain.ResponseDTO;
import net.lab1024.sa.base.common.domain.PageResult;
import org.springframework.web.bind.annotation.*;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;

import javax.annotation.Resource;
import javax.validation.Valid;
import java.util.List;

/**
 * 实训室设备管理 Controller
 *
 * @Author 王俊权
 * @Date 2024-11-14 16:13:22
 * @Copyright 🐂🐎bloc
 */

@RestController
@Tag(name = "实训室设备管理")
public class EquipmentManageController {

    @Resource
    private EquipmentManageService equipmentManageService;



    @Operation(summary = "分页查询 @author 王俊权")
    @PostMapping("/equipmentManage/queryPage")
    @SaCheckPermission("equipmentManage:query")
    public ResponseDTO<PageResult<EquipmentManageVO>> queryPage(@RequestBody @Valid EquipmentManageQueryForm queryForm) {
        return ResponseDTO.ok(equipmentManageService.queryPage(queryForm));
    }


    @Operation(summary = "查询所有设备 @author lyy")
    @GetMapping("/equipmentManage/queryEquipment/{statusCode}")
    @SaCheckPermission("equipmentManage:query")
    public ResponseDTO<List<EquipmentManageVO>> queryEquipment(@PathVariable Integer statusCode) {
        return ResponseDTO.ok(equipmentManageService.queryEquipment(statusCode));
    }




}
